const input1 = document.getElementById('input1')
input1.addEventListener('keyup', throttle(function () {
    console.log(input1.value)
}, 100))

function throttle(fn, delay) {
    let timer = null
    return function () {
        if (timer) return
        timer = setTimeout(function () {
            fn.apply(this, arguments)
            timer = null
        }, delay)
    }
}
